package com.alibaba.otter.node.etl.load.loader.mq.rabbit.consume;

import com.rabbitmq.client.Consumer;
import com.rabbitmq.client.ShutdownSignalException;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

import java.io.IOException;

@Slf4j
public abstract class AbstractConsumer implements Consumer {

    @Setter
    protected String consumerTag;

    @Override
    public void handleConsumeOk(String consumerTag) {
        log.debug("handleConsumeOk, consumerTag: " + consumerTag);
    }

    @Override
    public void handleCancelOk(String consumerTag) {
        log.debug("handleCancelOk, consumerTag: " + consumerTag);
    }

    @Override
    public void handleCancel(String consumerTag) throws IOException {
        log.debug("handleCancel, consumerTag: " + consumerTag);
    }

    @Override
    public void handleShutdownSignal(String consumerTag, ShutdownSignalException sig) {
        log.debug("handleShutdownSignal, consumerTag: " + consumerTag);
    }

    @Override
    public void handleRecoverOk(String consumerTag) {
        log.debug("handleRecoverOk, consumerTag: " + consumerTag);
    }
}
